package data.nanjing.expo.services;

import data.nanjing.expo.models.dao.AuthInfoDao;
import data.nanjing.expo.models.domain.AuthInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by zjp on 2018/7/4.
 * QQ：34948062
 * github: https://www.github.com/zjp1029
 * web： http://www.zjp1029.cn
 */
@Service
public class AuthInfoService {

    @Autowired
    private AuthInfoDao authInfoDao;

    public Integer addPersonAuthInfo(AuthInfo authInfo) {
        return authInfoDao.addPersonAuthInfo(authInfo);
    }

    public Integer addCompanyAuthInfo(AuthInfo authInfo) {
        return authInfoDao.addCompanyAuthInfo(authInfo);
    }

    public AuthInfo selectAuthInfoByUserId(Integer userId) {
        return authInfoDao.selectAuthInfoByUserId(userId);
    }

    public void updateCompanyAuthInfo(AuthInfo authInfo) {
        authInfoDao.updateCompanyAuthInfo(authInfo);
    }

    public void updatePersonAuthInfo(AuthInfo authInfo) {
        authInfoDao.updatePersonAuthInfo(authInfo);
    }

}
